/**
 * @author luguoxiang
 * @date 2022/7/5
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
import { createApi, request, toMd5 } from '@/soar';

export const basePath = '/flow/instance';
export const subject = '流程监控';

export default {
  page: (params: any) => request.get(`${basePath}/page`, { params }),
  auditLog: (params: { procInstId?: string; flowCode?: string; bizId?: string }) => {
    if (params.flowCode && params.bizId) {
      return request.get(`${basePath}/auditLog2`, { params });
    }
    return request.get(`${basePath}/auditLog`, { params: { procInstId: params.procInstId } });
  },
  progress: (procInstId: string) => request.get(`${basePath}/progress`, { params: { procInstId } }),
  revoke: (data: any) => request.post(`${basePath}/revoke`, { data, title: '撤销' }),
};
